using System;
using FluentNHibernate.Automapping;
using FluentNHibernate.Automapping.Alterations;
using MvcMall.Core.Domains;
using MvcMall.Core.Enums;

namespace MvcMall.Data.NHibernateMaps
{
    public class GoodsBrandMap :IAutoMappingOverride<GoodsBrand>
    {
        public void Override(AutoMapping<GoodsBrand> mapping)
        {
            mapping.References(c => c.Store).Column("StoreId");
            mapping.References(c => c.GoodsCat).Column("GoodsCatId");
            mapping.Map(c => c.GoodsBrandStatus).CustomType(typeof (GoodsBrandStatus));
            mapping.References(c => c.AdminUser).Column("AdminUserId");
        }
    }
}